/**
 * Created by Laggo on 15/12/24.
 */
app.service('linePurchaseService', ['ajax','$q',function (ajax,$q) {

    this.list = function (data){
        var deferred = $q.defer();
        ajax.get({
            url: 'back/purchaseOrder/page',
            data:data,
        }).then(function (result) {
            deferred.resolve(result);
        })
        return deferred.promise;
    }

    this.detail = function(data){
        var deferred = $q.defer();
        ajax.get({
            url: '/back/lorder/page',
            data: data,
            debug: true
        }).then(function (result) {
            deferred.resolve(result);
        })
        return deferred.promise;
    }

}]);